<template>
  <div>
    <el-form-item prop="password">
      <el-input
        v-model="loginForm.password"
        :type="pwdType"
        auto-complete="off"
        placeholder="密码"
        @keyup.enter.native="handleLogin"
      >
        <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
        <svg-icon
          :icon-class="eyeType"
          slot="suffix"
          class="el-input__icon input-icon"
          @click="changeType()"
        />
      </el-input>
    </el-form-item>
  </div>
</template>


<script>
export default {
  data() {
    return {
      codeUrl: "",
      cookiePassword: "",
      pwdType: "password",
      eyeType: "eye"
    };
  },
  methods: {
    changeType() {
      this.pwdType = this.pwdType === "password" ? "text" : "password";
      this.eyeType = this.eyeType === "eye" ? "eye-open" : "eye";
    }
  }
};
</script>



<style scoped>
</style>